Goto

Collaborating Authors

 tensorflow and pytorch


A Comparative Survey of PyTorch vs TensorFlow for Deep Learning: Usability, Performance, and Deployment Trade-offs

Alawi, Zakariya Ba

arXiv.org Artificial Intelligence

This paper presents a comprehensive comparative survey of TensorFlow and PyTorch, the two leading deep learning frameworks, focusing on their usability, performance, and deployment trade-offs. We review each framework's programming paradigm and developer experience, contrasting TensorFlow's graph-based (now optionally eager) approach with PyTorch's dynamic, Pythonic style. We then compare model training speeds and inference performance across multiple tasks and data regimes, drawing on recent benchmarks and studies. Deployment flexibility is examined in depth - from TensorFlow's mature ecosystem (TensorFlow Lite for mobile/embedded, TensorFlow Serving, and JavaScript support) to PyTorch's newer production tools (TorchScript compilation, ONNX export, and TorchServe). We also survey ecosystem and community support, including library integrations, industry adoption, and research trends (e.g., PyTorch's dominance in recent research publications versus TensorFlow's broader tooling in enterprise). Applications in computer vision, natural language processing, and other domains are discussed to illustrate how each framework is used in practice. Finally, we outline future directions and open challenges in deep learning framework design, such as unifying eager and graph execution, improving cross-framework interoperability, and integrating compiler optimizations (XLA, JIT) for improved speed. Our findings indicate that while both frameworks are highly capable for state-of-the-art deep learning, they exhibit distinct trade-offs: PyTorch offers simplicity and flexibility favored in research, whereas TensorFlow provides a fuller production-ready ecosystem - understanding these trade-offs is key for practitioners selecting the appropriate tool. We include charts, code snippets, and more than 20 references to academic papers and official documentation to support this comparative analysis


Reviews: Provably Correct Automatic Sub-Differentiation for Qualified Programs

Neural Information Processing Systems

In this submission, the authors consider the problem of computing sub-differentiation for a class of non-smooth functions automatically and correctly. They give a very nice example that illustrates problems with current automated differentiation frameworks, such as tensorflow and pytorch. Then, the authors prove a chain rule for the one-sided directional derivative of a composite non-smooth function satisfying certain assumptions. Based on this rule, the authors derive a (randomized) algorithm for computing such a derivative for a particular kind of programs only with constant overhead. The algorithm is very similar to the one for back-ward automatic differentiation except that its forward computation is based on the newly-proved chain rule in the submission, rather than the standard chain rule for differentiation.


Studying the Impact of TensorFlow and PyTorch Bindings on Machine Learning Software Quality

Li, Hao, Rajbahadur, Gopi Krishnan, Bezemer, Cor-Paul

arXiv.org Artificial Intelligence

Bindings for machine learning frameworks (such as TensorFlow and PyTorch) allow developers to integrate a framework's functionality using a programming language different from the framework's default language (usually Python). In this paper, we study the impact of using TensorFlow and PyTorch bindings in C#, Rust, Python and JavaScript on the software quality in terms of correctness (training and test accuracy) and time cost (training and inference time) when training and performing inference on five widely used deep learning models. Our experiments show that a model can be trained in one binding and used for inference in another binding for the same framework without losing accuracy. Our study is the first to show that using a non-default binding can help improve machine learning software quality from the time cost perspective compared to the default Python binding while still achieving the same level of correctness.


Fully tensorial approach to hypercomplex neural networks

Niemczynowicz, Agnieszka, Kycia, Radosław Antoni

arXiv.org Artificial Intelligence

The fast progress in applications of Artificial Neural Networks (NN) promotes new directions of research and generalizations. This involves advanced mathematical concepts such as group theory [19], differential geometry [5, 6], or topological methods in data analysis [7]. The core of NN implementations lies in linear algebra usage.


KHNNs: hypercomplex neural networks computations via Keras using TensorFlow and PyTorch

Niemczynowicz, Agnieszka, Kycia, Radosław Antoni

arXiv.org Artificial Intelligence

Neural networks used in computations with more advanced algebras than real numbers perform better in some applications. However, there is no general framework for constructing hypercomplex neural networks. We propose a library integrated with Keras that can do computations within TensorFlow and PyTorch. It provides Dense and Convolutional 1D, 2D, and 3D layers architectures.


Introduction To Intel's oneAPI AI Analytics Toolkit

#artificialintelligence

There are different hardware architectures such as CPU, GPU, FPGAs, AI accelerators, etc. The code written for one architecture can't easily run on another architecture. For example, the code written for CPU won't run on GPU without making some changes. This is one of the problems developers face when they want to migrate their code from CPU to GPU (or FPGAs or AI accelerators). Intel came up with a unified programming model called oneAPI to solve this very same problem. With oneAPI, it doesn't matter which hardware architectures (CPU, GPU, FGPA, or accelerators) or libraries or languages, or frameworks you use, the same code runs on all hardware architectures without any changes and additionally provides performance benefits. "oneAPI is a cross-industry, open, standards-based unified programming model that delivers a common developer experience across accelerator architectures -- for faster application performance, more productivity, and greater innovation."-


PyTorch vs TensorFlow: What Will be the Best Option for Data Scientists?

#artificialintelligence

If you want to be a successful data scientist or AI engineer, you must master the various deep learning frameworks that are currently available. In this article, we'll enlighten you about the best option for data scientists. TensorFlow and PyTorch both provide valuable abstractions that make model creation easier by minimizing boilerplate code. They vary in that PyTorch takes a more "pythonic" approach and is object-oriented, whereas TensorFlow provides a wide range of possibilities. PyTorch is used for many deep learning projects today, and its popularity among AI researchers is growing, despite being the least popular of the three main frameworks.


Top Machine Learning Frameworks

#artificialintelligence

Artificial Intelligence (AI), Deep learning (DL) and Machine Learning (ML) have advanced quickly over the last few years and are proven transformative engines for companies developing new technologies to get faster results and make our lives easier. The industry itself has grown rapidly and as the popularity of DL and ML continues to solidify, choosing the right framework is an important decision, and perhaps a critical one, to remaining competitive and improving business. The number of frameworks available to data scientists and developers initially increased in the early years of AI, but many have lost out to the most popular ones: TensorFlow and PyTorch. As more support has grown around these two frameworks, smaller niche frameworks and libraries have popped up that work directly with one or both of the main standouts. This article will take a look at TensorFlow and PyTorch, as well as a couple other frameworks that are still supported.


Is PyTorch better than TensorFlow?

#artificialintelligence

Many machine learning frameworks have strived to become the new favourite among researchers and industry practitioners. From an early academic output era of Caffe and Theano to the massive industry-backed and led by PyTorch and TensorFlow. Now, if we talk about deep learning (Subfield of Machine Learning) frameworks, most of them couldn't make it except TensorFlow and PyTorch. What better place could it be than to start from GitHub repositories, TensorFlow leads with 148k stars whereas PyTorch has around 50k stars which is alright as it started later. A data-driven comparison won't be good because changing times and changing needs won't make it a good parameter to rely on but a comparison based on the distinction of application can give us quite a good idea of what exactly we should consider and go for.


PyTorch vs TensorFlow for building deep learning models

#artificialintelligence

Two of the most popular Python-based deep learning libraries are PyTorch and TensorFlow. It may be difficult for a novice machine learning practitioner to decide which one to use when working with a deep learning model. You may be completely unaware of the distinctions, making it impossible for you to make an informed decision. We will look at some of those differences in practice in this article by creating a classifier by using both frameworks for the same problem-solving. Finally, we will conclude how the similar models defined to address the same problem but using different infrastructure defer in results.